import React from 'react'
import './Content.css'

export default function Content(props) {
  const {list,setGoodState}=props
  return (
    <div>
      {
        list.map(i=>{
          return (
            <div key={i.id} className='cart-good'>
              <span><input type="checkbox" checked={i.isChoose} onChange={()=>setGoodState(i.id,!i.isChoose)}/>{i.name}</span>
              <span>￥{i.price}</span>
            </div>
          )
        })
      }
    </div>
  )
}
